import axios from "axios"
export const InvoiceReceiveInfoSrvice = class InvoiceReceiveInfoSrvice {
        static InvoiceReceiveInfoSrvice = null
    requestUrl = 'http://localhost/invoicereceiveinfo'

    static getInstance() {
        if (this.InvoiceReceiveInfoSrvice == null) {
            this.InvoiceReceiveInfoSrvice = new InvoiceReceiveInfoSrvice()
        }
        return this.InvoiceReceiveInfoSrvice
    }
    //查询所有员工
    list(em){
        return axios.get(`${this.requestUrl}/all`,{params:em})
    }
    //id查有员工
    listById(id){
        return axios.get(`${this.requestUrl}/${id}`)
    }
    //添加员工
    save(emp){
        return axios.post(`${this.requestUrl}/`,emp)
    }
    //修改
    update(emp){
        return axios.put(`${this.requestUrl}/`,emp)
    }
    //删除
    remove(id){
        return axios.delete(`${this.requestUrl}/${id}`)
    }
}
